package com.example.book_test.advice;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/test")
@RestController
public class ErrorTest {
    @RequestMapping("/nullPoint")
    public void nullPoint(){
        String s = null;
        System.out.println(s.length());
    }
    @RequestMapping("/ArithPoint")
    public void ArithPoint(){
        int a = 10 / 0;
    }

    @RequestMapping("/elsePoint")
    public void elsePoint(){
        int[] nums = new int[1];
        System.out.println(nums[2]);
    }
}
